-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add hello world command to demo bundle and configure new log to console handler #557
Conversation
we require ~2.4 now as we use a new feature that was introduced in 2.4
level: debug | ||
console: | ||
type: console | ||
bubble: false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this increases performance so the firephp and chromephp handler are not executed for console commands
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the meaning of "bubble" ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello.
I just hit an issue here with bubble and I would like to discuss about it
I was trying to debug my application, and so I added a new handler to push all my logs to the Elasticsearch/Heka/Kibana stack (to get a better visualisation / filter system for my logs...) . I did not really think about the order of the handlers and so I added my new handler after the previous handlers. And so I ended-up with the following config:
monolog:
handlers:
main:
type: stream
path: "%kernel.logs_dir%/%kernel.environment%.log"
level: debug
channels: ["!event", "!consumer_status", "!beberlei_metrics"]
console:
type: console
bubble: false
channels: ["!doctrine", "!event", "!consumer_status", "!beberlei_metrics"]
heka:
type: socket
level: debug
connection_string: "udp://heka.lxc:5565"
timeout: 1
connection_timeout: 1
formatter: monolog.formatter.json
After that, I tried to debug my code and noticed I missed lot of logs. I try to understand why (is it an issue with ES or heka or kibana ? ; It is an issue with my code ? ; etc ?). And I finally understood my issue.
So finally, I really think the console handler should bubble all logs, because It's "just" a nice to have feature (A very good one BTW, thanks again). But it should not "eat" logs. All handlers registered after the handler should also be able to get all logs. So, IMHO, we should turn on the bubble here.
WDTY ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it doesnt really matter if bubble is enabled or not as the firephp and chromephp handler are not enabled anymore by default in SE.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Tobion Yes I know and my "issue" was not about firephp. It was about DX ; to remove a possible WTF effect.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
feel free to change it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I already changed it in my app ; But I wanted to know if you think it's a good idea to change it in symfony too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm ok to change it
@fabpot could you merge it? I wanna write about that. |
This PR was merged into the master branch. Discussion ---------- Add hello world command to demo bundle and configure new log to console handler First commit: allows the master branch to install 2.4-dev. Second commit: added a hello world command in demo bundle Third commit: configure the log to console handler that is possible since symfony/monolog-bundle#42 Commits ------- 0cafa50 also allow doctrine 2.4 to be installed b47328a configure the log to console handler 7baa790 added a hello world command in demo bundle 8a246dc allow master branch to install 2.4-dev
see symfony#557 (comment) for more information
This PR was merged into the 2.7 branch. Discussion ---------- [Monolog] Console handler don't bubble anymore | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - see #557 (comment) for more information Commits ------- 8fb1e81 [Monolog] Console handler don't bubble anymore
First commit: allows the master branch to install 2.4-dev.
Second commit: added a hello world command in demo bundle
Third commit: configure the log to console handler that is possible since symfony/monolog-bundle#42